import java.util.Random;

public class test {
    public static void main1(String[] args) {
        Random random = new Random(13156);
        int rannum = random.nextInt(51)+50;   // [50,101) ---> [50，100]
        System.out.println(rannum);
    }

    public static void main(String[] args) {
        double number1 = Math.random();  //生成小数 0~1
        int number2 = (int) (Math.random() * 100);  // 0~100
        System.out.println("生成随机小数：" + number1);
        System.out.println("生成随机整数：" + number2);
    }
}
